//路由

import VueRouter from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewList from './components/new/NewList.vue'
import NewsInfo from './components/new/NewsInfo.vue'
import PhotoList from './components/photo/photolist.vue'
import PhotoInfo from './components/photo/photoInfo.vue'
import GoodList from './components/godd/goodList.vue'
import GoodInfo from './components/godd/goodsinfo.vue'
import GoodGodesc from './components/godd/goodGodesc.vue'
import GoodGocomment from './components/godd/goodGocomment.vue'

var router = new VueRouter({
	routes:[
		//配置路由规则
		{path:'/',redirect:'/home'},
		{path:'/home',component:HomeContainer },
		{path:'/member',component:MemberContainer},
		{path:'/shopcar',component:ShopcarContainer },
		{path:'/search',component:SearchContainer},
		{path:'/home/newlist',component:NewList},
		{path:'/home/newsInfo/:id',component:NewsInfo},
		{path:'/home/photoList',component:PhotoList},
		{path:'/home/photoInfo/:id',component:PhotoInfo},
		{path:'/home/goodList',component:GoodList},
		{path:'/home/goodInfo/:id',component:GoodInfo,name:'goodinfo'},
		{path:'/home/goodGodesc/:id',component:GoodGodesc,name:"godesc"},
		{path:'/home/goodComment/:id',component:GoodGocomment,name:"gocomment"},
		
		
	],
	linkActiveClass:'mui-active' //覆盖默认高亮的类 默认的类叫router-link-active
})

//把路由对象暴露出去
export default router